package com.star.star.Activity;

import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;

import com.bumptech.glide.Glide;
import com.star.star.R;
import com.star.star.utils.CircleImageView;

public class mineActivity extends AppCompatActivity implements View.OnClickListener {
    private TextView tv_main_title,tv_back,tv_clocka,tv_clockb,tv_clockc;
    @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.adapter_mine);
        tv_back =  findViewById(R.id.tv_back);
        tv_clocka =  findViewById(R.id.tv_clocka);
        tv_clockb =  findViewById(R.id.tv_clockb);
        tv_clockc =  findViewById(R.id.tv_clockc);
        tv_main_title =  findViewById(R.id.tv_main_title);
        tv_main_title.setText("打榜");
        tv_back.setOnClickListener(this);
        tv_clocka.setOnClickListener(this);
        tv_clockb.setOnClickListener(this);
        tv_clockc.setOnClickListener(this);
        ImageView rl_bg = findViewById(R.id.rl_bg);
        CircleImageView iv_min_image = findViewById(R.id.iv_min_image);
        TextView tv_min_name = findViewById(R.id.tv_min_name);
        TextView tv_min_num = findViewById(R.id.tv_min_num);
        Glide.with(this).load(getIntent().getStringExtra("iv")).placeholder(R.mipmap.no_hand).error(R.mipmap.no_hand).into(iv_min_image);
        Glide.with(this).load(getIntent().getStringExtra("iv")).into(rl_bg);
        tv_min_name.setText(getIntent().getStringExtra("name"));
        tv_min_num.setText("得分："+getIntent().getStringExtra("num"));
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tv_back:
               finish();
                break;
                case R.id.tv_clocka:
                case R.id.tv_clockb:
                case R.id.tv_clockc:
                    Toast.makeText(this,"打赏成功",Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
